function save_new_blog_req( )
{
    /*
     * $.ajax({ url : "/messages", cache : false, success : function( html ) {
     * $("#chatcontent").html(html); } }); setTimeout('updateMsg()', 4000);
     */
    if (check_value_null("new_blog_title") || check_value_null("new_blog_text"))
    {
	alert("title and text should not be none!");
	return;
    }
    var new_blog_form = document.getElementById("new_blog_form");
    new_blog_form.submit();
}

function check_value_null( id )
{
    var obj = document.getElementById(id);
    if (obj.value == "")
    {
	return true;
    }
    return false;
}

function delete_blog( id )
{
    if (confirm("Delete?"))
    {
	var obj = document.getElementById(id);
	obj.submit();
    }
}

function delete_life( id )
{
    if (confirm("Delete?" + id))
    {
    }
    else
    {
	return;
    }
}
